package com.zhaokuner.provider.service.backup.controller;

import com.zhaokuner.parentstarter.common.ResultData;
import com.zhaokuner.parentstarter.ctrladaptor.annotation.CtrlAdaptorService;
import com.zhaokuner.parentstarter.ctrladaptor.model.CtrlAdaptorReqEntry;
import com.zhaokuner.provider.service.backup.model.ao.UserAO;
import com.zhaokuner.provider.service.backup.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 * Description:BackupTipConfirmController Adaptor
 * <p>
 * Copyright: 天津联想协同科技有限公司
 * <p>
 *
 * @author 赵希坤 zhaoxikun
 * @date 2021/2/10 11:57
 */
@CtrlAdaptorService(name = "provider")
public interface BackupTipConfirmControllerAdaptor {
    
    /**
     * 方法描述：测试 annotation
     *
     * @param str
     * @param request
     * @return com.zhaokuner.parentstarter.common.ResultData<java.util.List < com.zhaokuner.provider.service.backup.model.vo.UserVO>>
     * @author 赵希坤
     * @date 日期：2021/12/19 时间：6:25 下午
     */
    ResultData<List<UserVO>> annotationTest(String str, HttpServletRequest request);

    /**
     * 方法描述：demo get方法
     *
     * @param str
     * @return com.zhaokuner.parentstarter.common.ResultData
     * @author 赵希坤
     * @date 日期：2021/2/14 时间：20:34
     */
    default ResultData<List<UserVO>> showTip(String str, HttpServletRequest request) {
        return CtrlAdaptorReqEntry.get("/backuppolicy/showtip")
                .params("str", str).toResultData();
    }

    /**
     * 方法描述：post方法
     *
     * @param userAO
     * @return com.zhaokuner.parentstarter.common.ResultData<com.zhaokuner.provider.service.backup.model.vo.UserVO>
     * @author 赵希坤
     * @date 日期：2021/2/25 时间：2:14 下午
     */
    default ResultData<UserVO> update(@Valid UserAO userAO) {
        return CtrlAdaptorReqEntry.post("/backuppolicy/update").postContent(userAO)
                .toResultData();
    }
}
